/**
 *******************************************************************************
 * @FileName  : track_timing.c
 * @Author    : Gaoqiu
 * @CreateDate: 2020-02-18
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */
#include "ll_track_timing.h"
#include "utils/track.h"
#include "utils/assert.h"

WEAK __ram_code
void LL_TrackTimingScheduler(uint8_t high)
{
#if TIMING_TRACK_EN
	if(high){
		DBG_CHN7_HI
	}
	else{
		DBG_CHN7_LO
	}
#endif
}

WEAK __ram_code
void LL_TrackTimingAdv(uint8_t high)
{
#if TIMING_TRACK_EN
	if(high){
		DBG_CHN1_HI
	}
	else {
		DBG_CHN1_LO
	}
#endif
}

WEAK __ram_code
void LL_TrackTimingScan(uint8_t high)
{
#if TIMING_TRACK_EN
	if(high){
		DBG_CHN0_HI
	}
	else{
		DBG_CHN0_LO
	}
#endif
}

WEAK __ram_code
void LL_TrackTimingConnEvt(uint16_t connHandle, uint8_t high)
{
#if TIMING_TRACK_EN
	if(high)
	{
		if(connHandle == 0){
			DBG_CHN4_HI
		}else if(connHandle == 1){
			DBG_CHN5_HI
		}else if(connHandle == 2){
			DBG_CHN6_HI
		}else if(connHandle == 3){
			DBG_CHN8_HI
		}else if(connHandle == 4){
			DBG_CHN9_HI
		}else if(connHandle == 5){
			DBG_CHN10_HI
		}else if(connHandle == 6){
			DBG_CHN11_HI
		}else if(connHandle == 7){
			DBG_CHN12_HI
		}
		else{
			ASSERT(0, 0xFFFFAACC);
		}
	}
	else{
		if(connHandle == 0){
			DBG_CHN4_LO
		}else if(connHandle == 1){
			DBG_CHN5_LO
		}else if(connHandle == 2){
			DBG_CHN6_LO
		}else if(connHandle == 3){
			DBG_CHN8_LO
		}else if(connHandle == 4){
			DBG_CHN9_LO
		}else if(connHandle == 5){
			DBG_CHN10_LO
		}else if(connHandle == 6){
			DBG_CHN11_LO
		}else if(connHandle == 7){
			DBG_CHN12_LO
		}
		else{
			ASSERT(0, 0xFFFFAACC);
		}
	}
#endif
}

WEAK __ram_code
void LL_TrackTimingCodeExe(uint8_t high)
{
#if 0
	if(high){
		DBG_CHN12_HI
	}
	else{
		DBG_CHN12_LO
	}
#endif
}

